home *** CD-ROM | disk | FTP | other *** search
- #ifndef _RESOLV_H_
- #define _RESOLV_H_
-
- /*
- * Revision information. This is the release date in YYYYMMDD format.
- * It can change every day so the right thing to do with it is use it
- * in preprocessor commands such as "#if (__RES > 19931104)". Do not
- * compare for equality; rather, use it to determine whether your resolver
- * is new enough to contain a certain feature.
- */
-
- #define __RES 19960801
-
- /*
- * This used to be defined in res_query.c, now it's in herror.c. It was
- * never extern'd by any *.h file before it was placed here. herror.c is
- * part of libresolv.a even though it might make more sense in libnetdb.a
- * or even libnet.a.
- */
-
- extern int h_errno;
-
- /*
- * Global defines and variables for resolver stub.
- */
- #define MAXNS 3 /* max # name servers we'll track */
- #define MAXDFLSRCH 3 /* # default domain levels to try */
- #define MAXDNSRCH 6 /* max # domains in search path */
- #define LOCALDOMAINPARTS 2 /* min levels in name that is "local" */
-
- #define RES_TIMEOUT 5 /* min. seconds between retries */
- #define MAXRESOLVSORT 10 /* number of net to sort on */
- #define RES_MAXNDOTS 15 /* should reflect bit field size */
-
- /*
- * Resolver options (keep these in synch with res_debug.c, please)
- */
- #define RES_INIT 0x00000001 /* address initialized */
- #define RES_DEBUG 0x00000002 /* print debug messages */
- #define RES_AAONLY 0x00000004 /* authoritative answers only (!IMPL)*/
- #define RES_USEVC 0x00000008 /* use virtual circuit */
- #define RES_PRIMARY 0x00000010 /* query primary server only (!IMPL) */
- #define RES_IGNTC 0x00000020 /* ignore trucation errors */
- #define RES_RECURSE 0x00000040 /* recursion desired */
- #define RES_DEFNAMES 0x00000080 /* use default domain name */
- #define RES_STAYOPEN 0x00000100 /* Keep TCP socket open */
- #define RES_DNSRCH 0x00000200 /* search up local domain tree */
- #define RES_INSECURE1 0x00000400 /* type 1 security disabled */
- #define RES_INSECURE2 0x00000800 /* type 2 security disabled */
- #define RES_NOALIASES 0x00001000 /* shuts off HOSTALIASES feature */
- #define RES_USE_INET6 0x00002000 /* use/map IPv6 in gethostbyname() */
-
- #define RES_DEFAULT (RES_RECURSE | RES_DEFNAMES | RES_DNSRCH)
-
- #endif /* !_RESOLV_H_ */
-